//
//  ImageAnimations.m
//  WaterStreet
//
//  Created by 재효 조 on 12. 2. 13..
//  Copyright (c) 2012년 가족. All rights reserved.
//

#import "ImageAnimations.h"

@implementation ImageAnimations

-(CABasicAnimation *) moveBackgoundReverceSlide:(CALayer*) backgound
{
    
    CGPoint startPt = CGPointMake( backgound.bounds.size.width/2, backgound.position.y);
    CABasicAnimation *anim = [CABasicAnimation animationWithKeyPath:@"position"];
    [anim setAutoreverses:YES];
    anim.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionLinear];
    anim.fromValue = [NSValue valueWithCGPoint:startPt];
    //    anim.toValue = [NSValue valueWithCGPoint:endPt];
    
    anim.repeatCount = HUGE_VALF;
    anim.duration = 3.0;
    
    return anim;
}

@end
